package com.kystar.muxplayer.protocol.code.set;

import com.kystar.muxplayer.model.FreqType;
import com.kystar.muxplayer.protocol.CodeCmd;

public class CS04_OutPut extends CodeCmd {
//    1	输出分辨率类型
//    2	输出分辨率自定义配置
//    3	输出帧率
    private CS04_OutPut(int...param) {
        super(param);
    }

    @Override
    public byte getCode() {
        return 0x04;
    }

    public static CS04_OutPut resolution(int resolutionId) {//分辨率
        return new CS04_OutPut(1,resolutionId);
    }

     public static CS04_OutPut resolutionHand(int width,int height) {//分辨率
         return new CS04_OutPut(2,width>>8&0xff,width&0xff,height>>8&0xff,height&0xff);
     }

     public static CS04_OutPut freq(FreqType freqType) {
        return new CS04_OutPut(3,freqType.ordinal());
     }
}
